﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Policy;
namespace Reporting.AppDomainExt
{
    public static class AppDomainSetupExt
    {
        public static System.AppDomainSetup Copy(this System.AppDomainSetup Parent)
        {
            System.AppDomainSetup Result=new AppDomainSetup();
            Result.ActivationArguments = Parent.ActivationArguments;
            Result.AppDomainInitializer = Parent.AppDomainInitializer;
            Result.AppDomainInitializerArguments = Parent.AppDomainInitializerArguments;
            Result.AppDomainManagerAssembly = Parent.AppDomainManagerAssembly;
            Result.AppDomainManagerType = Parent.AppDomainManagerType;
            Result.ApplicationBase = Parent.ApplicationBase;
            Result.ApplicationName = Parent.ApplicationName;
            Result.ApplicationTrust = Parent.ApplicationTrust.Clone() as ApplicationTrust;
            Result.CachePath = Parent.CachePath;
            Result.ConfigurationFile = Parent.ConfigurationFile;
            Result.DisallowApplicationBaseProbing = Parent.DisallowApplicationBaseProbing;
            Result.DisallowBindingRedirects = Parent.DisallowBindingRedirects;
            Result.DisallowCodeDownload = Parent.DisallowCodeDownload;
            Result.DisallowPublisherPolicy = Parent.DisallowPublisherPolicy;
            Result.DynamicBase = Parent.DynamicBase;
            Result.LicenseFile = Parent.LicenseFile;
            Result.LoaderOptimization = Parent.LoaderOptimization;
            Result.PartialTrustVisibleAssemblies = Parent.PartialTrustVisibleAssemblies;
            Result.PrivateBinPath = Parent.PrivateBinPath;
            Result.PrivateBinPathProbe = Parent.PrivateBinPathProbe;
            Result.SandboxInterop = Parent.SandboxInterop;
            Result.ShadowCopyDirectories = Parent.ShadowCopyDirectories;
            Result.ShadowCopyFiles = Parent.ShadowCopyFiles;
            return Result;
        }
    }
}
